home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1988 January / Ahoy_Magazine_88-01_1988_Double_L.d64 / Fade Away 64-3 (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  894b  |  25 lines

  1. 1 rem ==================================
  2. 2 rem    commodares problem #45-2 :
  3. 3 rem      fade away
  4. 4 rem    solution by
  5. 5 rem      robert marcus
  6. 6 rem ======  c-64 only  ===============
  7. 50 printchr$(142)chr$(147)
  8. 60 printtab(82)"there will be a slight delay before"
  9. 65 printtab(82)"the characters begin to fade before"
  10. 70 printtab(82)"your eyes"
  11. 100 poke254,peek(56):poke56,56:clr:rem protect char. mem. from basic
  12. 105 dimn(7):n(0)=3:n(1)=1:n(2)=6:n(3)=0:n(4)=5:n(5)=7:n(6)=4:n(7)=2
  13. 110 poke 56334,peek(56334)and254
  14. 120 poke 1,peek(1)and251
  15. 130 fori=0to272:pokei+14336,peek(i+53248):next:rem move first 34 characters
  16. 140 poke1,peek(1)or4
  17. 150 poke56334,peek(56334)or1
  18. 160 poke53272,(peek(53272)and240)or14:rem new char. mem. location
  19. 170 printtab(85)"now we shall begin fading out"
  20. 180 fori=0to7:bi(i)=2^i:next:rem set bit
  21. 190 forj=0to7:fori=14344to14608
  22. 200 pokei,peek(i)andnot(bi(n(j))):next:next:rem wipe out char's bit by bit
  23. 220 print"[147]":poke53272,(peek(53272)and240)or4:rem return to rom char mem.
  24. 230 poke56,peek(254):clr:rem put top of mem back
  25.